<?php
$products = Product::model()->findAllByAttributes(array(
    'status'=>Product::STATUS_ACTIVED,
    'category'=>Product::TYPE_GAO_KHO,
));
?>
<div class="page-header">
<h1>Danh sách các sản phẩm cửa hàng</h1>
</div>

    <div class="row-fluid">
        <ul class="portfolio thumbnails ">
            <?php
            /**
            * @var Product $product
            */
            foreach($products as $product)
            {
                ?>
                <li class="span4">
		            <div class="span10" style="overflow: hidden; height: 190px; width: 200px;">
		            	<div style="display: table-cell; text-align: center; vertical-align: middle; overflow: hidden; width: 180px; height: 200px;">
		            	<a href="<?php echo Yii::app()->theme->baseUrl . '/img/product/' . $product->image;?>" rel="lightbox" class="thumbnail" >
		            		<div style="top: 50%;" class="background"><img src="<?php echo Yii::app()->theme->baseUrl . '/img/product/' . $product->image;?>" alt="" class="img-polaroid"></div>
		            	</a>
		            	</div>
		            </div>
		            <div style="clear: both;"></div><h5><span style="font-size: 10pt;">Đặc điểm:</span> <a data-toggle="modal" data-target="#myModal-<?php echo $product->id;?>" title="<?php echo $product->name;?>" href="#"><?php echo $product->name;?></a></h5>
		            <div style="clear: both;"></div><h3><span class="pull-left">Giá: </span><span class="span6 pull-left" style="color: red; font-weight: bold;"><?php echo Yii::app()->numberFormatter->formatCurrency($product->price, "VND")?></span><span class="pull-left">/Kg</span></h3>
		        </li>
                <?
                include('modal.php');
            }
            ?>
        </ul>
	</div> <!--/row-fluid-->